3.11 \(\int \cos ^4(c+d x) (A+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=61 \[ \frac{(3 A+4 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{A \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{1}{8} x (3 A+4 C) \]

[Out]

((3*A + 4*C)*x)/8 + ((3*A + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (A*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0435039, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4045, 2635, 8} \[ \frac{(3 A+4 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{A \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{1}{8} x (3 A+4 C) \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2),x]

[Out]

((3*A + 4*C)*x)/8 + ((3*A + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (A*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)

Rule 4045

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cos ^4(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac{A \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{4} (3 A+4 C) \int \cos ^2(c+d x) \, dx\\ &=\frac{(3 A+4 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{A \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{8} (3 A+4 C) \int 1 \, dx\\ &=\frac{1}{8} (3 A+4 C) x+\frac{(3 A+4 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{A \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end{align*}

Mathematica [A]  time = 0.0865146, size = 45, normalized size = 0.74 \[ \frac{4 (3 A+4 C) (c+d x)+8 (A+C) \sin (2 (c+d x))+A \sin (4 (c+d x))}{32 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2),x]

[Out]

(4*(3*A + 4*C)*(c + d*x) + 8*(A + C)*Sin[2*(c + d*x)] + A*Sin[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 65, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( A \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +C \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(A+C*sec(d*x+c)^2),x)

[Out]

1/d*(A*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+C*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c
))

________________________________________________________________________________________

Maxima [A]  time = 1.40751, size = 99, normalized size = 1.62 \begin{align*} \frac{{\left (d x + c\right )}{\left (3 \, A + 4 \, C\right )} + \frac{{\left (3 \, A + 4 \, C\right )} \tan \left (d x + c\right )^{3} +{\left (5 \, A + 4 \, C\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(A+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

1/8*((d*x + c)*(3*A + 4*C) + ((3*A + 4*C)*tan(d*x + c)^3 + (5*A + 4*C)*tan(d*x + c))/(tan(d*x + c)^4 + 2*tan(d
*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 0.485769, size = 119, normalized size = 1.95 \begin{align*} \frac{{\left (3 \, A + 4 \, C\right )} d x +{\left (2 \, A \cos \left (d x + c\right )^{3} +{\left (3 \, A + 4 \, C\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(A+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/8*((3*A + 4*C)*d*x + (2*A*cos(d*x + c)^3 + (3*A + 4*C)*cos(d*x + c))*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(A+C*sec(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.16351, size = 99, normalized size = 1.62 \begin{align*} \frac{{\left (d x + c\right )}{\left (3 \, A + 4 \, C\right )} + \frac{3 \, A \tan \left (d x + c\right )^{3} + 4 \, C \tan \left (d x + c\right )^{3} + 5 \, A \tan \left (d x + c\right ) + 4 \, C \tan \left (d x + c\right )}{{\left (\tan \left (d x + c\right )^{2} + 1\right )}^{2}}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(A+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/8*((d*x + c)*(3*A + 4*C) + (3*A*tan(d*x + c)^3 + 4*C*tan(d*x + c)^3 + 5*A*tan(d*x + c) + 4*C*tan(d*x + c))/(
tan(d*x + c)^2 + 1)^2)/d